package org.example.gametalk.Controller;

import org.example.gametalk.Entity.User;
import org.example.gametalk.Service.LoginService;
import org.example.gametalk.gameTalkUtils.Response;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class loginController {

    @Autowired
    LoginService loginService;

    @PostMapping("/login")
    public Response<Object> login(@RequestBody User user) {
        return loginService.login(user);
    }
}
